package com.qingcloud.df.executor.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class TaskService {
    @Value("${qingcloud.executor.task.type}")
    private String taskType;



    public Long saveJob(Integer jobId, Integer instanceId, String cron, String env){
      return 0L;
    }

    public Long updateJob(Long taskId, String cron){

        return 0L;
    }

    public void fetchJob(Long jobId) {

    }

    public void disableJob(Long jobId) {

        if(taskType.equals("local")) {

        }
    }

    public void enableJob(Long jobId) {
        if(taskType.equals("local")) {

        }
    }

    public void deleteJob(Long jobId) {
        if(taskType.equals("local")) {

        }
    }

    public void runJob(Long jobId) {

        if(taskType.equals("local")) {

        }
    }
}
